<?php
class Factory{
	public static function M($class){
		static $classlist=array();
		if(!(isset($classlist[$class]) && is_object($classlist[$class]))){
			$classname = $class.'Model';
			$classlist[$class] = new $classname();
		}
		return $classlist[$class];
	}
}